<template>
  <div ref="rootRef">
    <slot></slot>
  </div>
</template>

<script setup>
  import useScroll from './use-scroll'
  import { ref, defineProps, defineEmits, defineExpose } from 'vue'

  const rootRef = ref(null)
  const props = defineProps({
    click: {
      type: Boolean,
      default: true
    },
    probeType: {
      type: Number,
      default: 0
    }
  })
  const emits = defineEmits(['scroll'])
  const scroll = useScroll(rootRef, props, emits)

  // 暴露出去scroll方法
  defineExpose({
    scroll
  })

</script>

<style scoped lang="scss">

</style>
